1. Field of the Invention
The present invention relates generally to an image processing apparatus and image processing method for changing a tone of an image.
2. Description of the Related Art
In recent years, digital cameras are widely available, and digital photographs are usually saved as digital image data. For example, images can be viewed on a digital camera or image data can be loaded to a personal computer and images can be viewed on the personal computer. As described above, users can enjoy digital photographs in various ways. For example, a technique (picture conversion technique) has been suggested to apply image processing to image data so as to change a tone of a digital photograph in order to convert the digital photograph to works of fine art (for example, oil painting or water color painting) based on the original picture and display the converted artwork (see Jpn. Pat. Appln. KOKAI Publication No. H08-44867).
In the picture conversion, a tone of each piece of pixel data representing an image such as a digital photograph is changed according to a predetermined algorithm (picture conversion algorithm), whereby the picture is converted to an artwork of various styles.
When the original image can be converted to the artwork of various styles as described above, the artwork images are required to be displayed so that the artwork images can be seen at a glance. In this circumstance, a technique for displaying a list of different kinds of reduced images (thumbnail images) has been proposed (see Jpn. Pat. Appln. KOKAI Publication No. 2009-284326).
In principle, the picture conversion is the same as effect processing for brightness-controlling, sharpening, and softening an image, for example. An image appearing to be an artwork may be obtained if the effect processing is manually applied by trial-and-error and significant efforts have been made for many hours. In contrast, the picture conversion algorithm is a sophisticated programmed conversion algorithm. For example, features such as color information and brush feel information are extracted from an original picture such as an oil painting and a pastel drawing drawn/painted by a real artist, and the extracted features are made into parameters and incorporated into the conversion algorithm.
In the conversion algorithm, a parameter group P is prepared in advance. The parameter group P is a set of the parameters (picture conversion parameters) for changing a tone of the original image. When there are 12 styles of artworks, the parameter groups for the artworks are denoted with P(1) to P(12). Each of the parameter group includes plural parameters.
A parameter is an element for applying effect processing to a pixel. In other words, a pixel is usually represented by a level having multiple bits in each of RGB colors, and the parameter is an element for applying computation to the bit data. A specific example will be explained below. For example, when a red component is emphasized, and green and blue components are slightly reduced, the following arithmetic operation is performed: R×2, G×0.9, and B×0.5. In this case, “2”, “0.9”, and “0.5” are parameters for changing a color of the image. Alternatively, for example, when arithmetic operations are programmed in advance, the following arithmetic operation is performed: R×1.1 is calculated where the degree of emphasis of red is 1, R×1.2 is calculated where the degree of emphasis of red is 2, and R×1.3 is calculated where the degree of emphasis of red is 3. In this case, the degree of emphasis is also a parameter.
Still alternatively, a predetermined arithmetic operation may be performed using not only target pixels (such as pixels in a face region) but also pixels adjacent to the target pixels. For example, it is assumed that pixels A1(R, G, B), A2(R, G, B), A3(R, G, B), A4(R, G, B), A5(R, G, B), A6(R, G, B), A7(R, G, B), A8(R, G, B), A9(R, G, B) are arranged at the left, right, top, and bottom with respect to the pixel of interest A5(R, G, B) in the center. For A5(R), the following arithmetic operation is performed: A5(R)=A1(R)×q1+A2(R)×q2+A3(R)×q3+A4(R)×q4+A5(R)×q5+A6(R)×q6+A7(R)×q7+A8(R)×q8+A9(R)×q9. The same computation as the above is also performed for each of G and B. In this case, q1 to q9 are parameters. When these values (coefficients) are changed, different effect processing can be achieved.
However, examples of an artwork obtained by the picture conversion include many styles of images such as oil painting image, water-color painting image, or pastel drawing image. For example, a CPU needs to perform arithmetic operation on ROB data having 12 million pixels in order to perform the above conversion processing. Therefore, the CPU has to perform a large amount of computation, and it takes a long time to perform the conversion processing.
Moreover, since it takes a long time to perform the conversion processing, it is difficult to instantly try various conversions to select a converted image of the most suitable artwork style.